<template>
    <EleTableComp :config="config"></EleTableComp>
  </template>
  <script>
import EleTableComp from "@/components/EleTableComp";
import { typeJson } from "@/components/EleTableComp/config.js";
  export default {
    data() {
      return {
        config: {
          header: {
            breadcrumb: `上级检查计划`,
            addButton: false,
            search: [
              {
                type: "datePicker",
                value: "",
                prop: "startDate",
                label: "开始日期",
              },
              {
                type: "datePicker",
                value: "",
                prop: "endDate",
                label: "至",
              },
              {
                type: "input",
                prop: "planName",
                placeholder: "",
                value: "",
                label: "计划名称",
              },
              // {
              //   type: "netDropDown",
              //   prop: "deptId",
              //   value: "",
              //   label: "部门",
              //   list: {
              //     url: "/organization/getList?",
              //     label: "orgName",
              //     value: "id",
              //     mineId: false,
              //     data: {},
              //   },
              // },
            ],
          },
          footer: {
            pagination: true,
          },
          table: [
            {
              type: "index",
              addEditHidden: true,
            },
            {
               label: "计划类型",
              prop: "planType",
              value: "",
              type:'dropDown',
              addEditType:'dropDown',
              list:typeJson.planTypthree,
              required: true, 
               hidden:true,
              //  disabled: true, 
            },
            {
              label: "计划名称",
              prop: "planName",
              value: "",
              required: true,
            },
            {
              label: "检查部位",
              prop: "checkPart",
              value: "",
              required: true,
            },
            //   {
            //   label: "检查人",
            //   prop: "checkMan",
            //   value: "",
            // },
            {
              label: "计划日期",
              prop: "checkDate",
              addEditType: "timePicker",
              value: "",
              required: true,
            },
            {
              prop: "accessory",
              label: "附件",
              type: "download",
              addEditType: "upload",
              value: "", 
            }, 
             {
              label: "操作",
              prop: "", // 传数据的时候 忽略
              type: "operation",
              isParam: false,
              addEditHidden: true,
              look: true,
              edit: true,
              delete: true,
               mineType:this.$store.state.mineType,
            },
          ],
          update: {
            url: "/app/checkPlan/update",
            method: "POST",
            data: this.form,
          },
          delete: {
            url: "/app/checkPlan/delete",
            method: "GET",
            id: -1,
          },
          insert: {
            url: "/app/checkPlan/insert",
            method: "POST",
            data: this.form,
            // mineId: true,
          },
          select: {
            url: "/app/checkPlan/getList",
            method: "POST",
            // mineId: true,
          params:{
             planType:3
            },
            currentPage: 1,
            pageSize: 100,
          },
        },
      };
    },
    components: {
      EleTableComp,
    },
  };
  </script>
  